--redzoneRPG
--by Kylegar
include("shared.lua")
include("VGUI/rz_textpanel/cl_init.lua")

function PlayerSkillPanel()
	skillpanel = vgui.Create("DFrame")
	skillpanel:SetWide(ScrW()/2)
	skillpanel:SetTall(ScrH()/2)
	skillpanel:SetTitle("Skill Panel")
	skillpanel:SetDraggable(true)
	skillpanel:SetSizable(false)
	skillpanel:SetPos(ScrW()/4 , ScrH()/4)
	local maxx = ScrW()/2
	local maxy = ScrH()/2
	local buttonwidth = maxx/8
	local buttontall = maxy/10
	
	TextPanel = vgui.Create("rz_textpanel")
	TextPanel:SetParent(skillpanel)
	TextPanel:SetWide((maxx))
	TextPanel:SetTall(maxy)
	TextPanel:SetPos(1,1)
	
	
	 
	
	button1 = vgui.Create("DButton")
	button1:SetParent(skillpanel)	
	button1:SetText("Gunner")
	button1:SetWide( buttonwidth)
	button1:SetTall(buttontall)
	button1:SetPos((maxx/10) , maxy - (maxy/9))
	button1.DoClick = function()
						LocalPlayer():ConCommand("rz_game_AddBaseSkillLevel Gunner 1")
						skillpanel:Remove()
					  end					  
	button2 = vgui.Create("DButton")
	button2:SetParent(skillpanel)	
	button2:SetText("Support")
	button2:SetWide(buttonwidth)
	button2:SetTall(buttontall)
	button2:SetPos((maxx/3.5) , maxy - (maxy/9))
	button2.DoClick = function()
						LocalPlayer():ConCommand("rz_game_AddBaseSkillLevel Support 1")
						skillpanel:Remove()
					  end	
					  
	button3 = vgui.Create("DButton")
	button3:SetParent(skillpanel)	
	button3:SetText("Medic")
	button3:SetWide(buttonwidth)
	button3:SetTall(buttontall)
	button3:SetPos((maxx/2) , maxy - (maxy/9))
	button3.DoClick = function()
						LocalPlayer():ConCommand("rz_game_AddBaseSkillLevel Medic 1")
						skillpanel:Remove()
					  end	
					  
	button4 = vgui.Create("DButton")
	button4:SetParent(skillpanel)	
	button4:SetText("Engineer")
	button4:SetWide(buttonwidth)
	button4:SetTall(buttontall)
	button4:SetPos((maxx/1.4) , maxy - (maxy/9))
	button4.DoClick = function()
						LocalPlayer():ConCommand("rz_game_AddBaseSkillLevel Engineer 1")
						skillpanel:Remove()
					  end	

					  
	skillpanel:MakePopup()
	
	
end
concommand.Add("rz_cl_skillpanel", PlayerSkillPanel)
	